angular.module('Controller')
.controller('QgyCancelAppointModalCtrl',($scope,urls,$localStorage,NgTableParams,commonUtil,cryptUtil,wfAlert,commonConstant,$http, $uibModalInstance, items)->
    $scope.data=data=items.data
    $scope.confirm = ()->
        reqData={
            status:3
            remark:$scope.data.remark
        }
        $http.put("/appointment/#{$scope.data.id}",reqData)
        .success((resp)->
            if resp.code==0
                wfAlert.toastInfo('取消成功')
                $uibModalInstance.close('done')
            else
                wfAlert.toastError(resp.message)
        )
    $scope.cancel =()->
        $uibModalInstance.dismiss('cancel')
)